package com.rftennis.dto;

import lombok.Data;

@Data
public class JSONResponce {
	private String code;
	private String message;
	private Object data;
	
	public static JSONResponce ok() {
		return new JSONResponce("ok",null,null);
	}
	public static JSONResponce ok(Object data) {
		return new JSONResponce("ok",null,data);
	}
	public static JSONResponce fail(String code,String message) {
		return new JSONResponce(code,message,null);
	}
	public static JSONResponce fail(String message) {
		return new JSONResponce("fail",message,null);
	}


	public JSONResponce(String code, String message, Object data) {
		this.code = code;
		this.message = message;
		this.data = data;
	}
}
